﻿<%@ Page Title="Stubby Admin" Language="C#" MasterPageFile="~/Web Pages/Site.Master" 
    AutoEventWireup="true" CodeBehind="Administrator.aspx.cs" 
    Inherits="CS490_Capstone___Stubby.Page.Administrator" enableEventValidation="false" 
    ValidateRequest="False" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <!-- MAIN CONTENT -->
    <asp:Panel ID="content" CssClass="content" runat="server">
        <asp:Panel ID="topSpacer" CssClass="input" runat="server">
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>

    <!-- DROP DOWN LISTS (EVENTS, VENUES, SECTIONS, TICKETS -->
        <asp:Label ID="NoJavaScriptLabel" runat="server" 
                   Text=""
                   Width="800" 
                   CssClass="AdministratorNoJavaScriptLabel">
        </asp:Label>
        <br />
        <asp:DropDownList   ID="ddl_QueryType" runat="server" 
                            AutoPostBack="True" 
                            onselectedindexchanged="ddl_QueryType_SelectedIndexChanged" 
                            CausesValidation="True">
            <asp:ListItem Selected="True">Query Type</asp:ListItem>
            <asp:ListItem>DELETE</asp:ListItem>
            <asp:ListItem>INSERT</asp:ListItem>
            <asp:ListItem>UPDATE</asp:ListItem>
        </asp:DropDownList>
        <asp:DropDownList   ID="ddl_Event" runat="server" 
                            AutoPostBack="True" 
                            Enabled="False" 
                            onselectedindexchanged="ddl_Event_SelectedIndexChanged" 
                            CausesValidation="True">
            <asp:ListItem Selected="True">EVENT...</asp:ListItem>
        </asp:DropDownList>
        <asp:DropDownList   ID="ddl_Venue" runat="server" 
                            AutoPostBack="True" 
                            Enabled="False" 
                            onselectedindexchanged="ddl_Venue_SelectedIndexChanged" 
                            CausesValidation="True">
            <asp:ListItem Selected="True">VENUE...</asp:ListItem>
        </asp:DropDownList>
        <asp:DropDownList   ID="ddl_Section" runat="server" 
                            AutoPostBack="True" 
                            Enabled="False" 
                            onselectedindexchanged="ddl_Section_SelectedIndexChanged" 
                            CausesValidation="True">
            <asp:ListItem Selected="True">SECTION...</asp:ListItem>
        </asp:DropDownList>
        <asp:DropDownList   ID="ddl_Ticket" runat="server" 
                            AutoPostBack="True" 
                            Enabled="False" 
                            onselectedindexchanged="ddl_Ticket_SelectedIndexChanged" 
                            CausesValidation="True">
            <asp:ListItem Selected="True">TICKET...</asp:ListItem>
        </asp:DropDownList>
        <br />
        
            <!-- CONTENT PANEL FOR DROP DOWN LISTS -->
            <%----%> 
            <asp:Panel      ID="autoGeneratedContent" runat="server" 
                            CssStyle="content" 
                            BorderColor="Black" 
                            BorderStyle="Double"
                            Direction="LeftToRight" 
                            style="text-align: left">
            </asp:Panel>

            <!-- CONTENT BUTTONS FOR DROP DOWN LISTS -->
            <asp:Panel ID="DropDownListButtons" runat="server" 
                       style="text-align: left">
                <asp:Button ID="btn_AddRowIntoAutoGeneratedObjects" runat="server" 
                            onclick="btn_AddRowIntoAutoGeneratedObjects_Click" 
                            Text="Add Another Row" 
                            Visible="False"
                            Width="175px" />
                <asp:Button ID="btn_UpdateFromAutoGeneratedObjects" runat="server" 
                            onclick="btn_UpdateFromAutoGeneratedObjects_Click" 
                            Text="Update Selected Objects" 
                            Visible="False" 
                            Width="175px" />
                <asp:Button ID="btn_InsertFromAutoGeneratedObjects" runat="server" 
                            onclick="btn_InsertFromAutoGeneratedObjects_Click" 
                            Text="Insert Selected Objects" 
                            Visible="False" 
                            Width="175px" />
                <asp:Button ID="btn_DeleteFromAutoGeneratedObjects" runat="server" 
                            Text="Delete Selected Objects" 
                            Visible="False" 
                            Width="175px" />
                <br />
                <asp:PlaceHolder ID="DirtyCodePlaceHolder" runat="server"></asp:PlaceHolder>
            </asp:Panel>

            <!-- MODAL POPUP FOR DELETE CONFIRMATION -->
            <asp:ModalPopupExtender ID="ConfirmDelete" runat="server"
                                    TargetControlID="btn_DeleteFromAutoGeneratedObjects"
                                    PopupControlID="ConfirmDeletePopup"
                                    DropShadow="true"
                                    CancelControlID="CancelButton">
            </asp:ModalPopupExtender>

            <!-- PANEL USED FOR MODALPOPUPEXTENDER -->
            <asp:Panel ID="ConfirmDeletePopup" runat="server" 
                       Width= "500" 
                       Visible="False"
                       CssClass="modalPopup">

                <asp:Textbox ID="ConfirmDeletePopupHeader" runat="server"
                             Width="495"
                             CssClass="modalPopupHeader" 
                             Enabled="False"
                             Text="Confirm Delete:">
                </asp:Textbox>
                <br />
                <br />
                <asp:Image ID="PopupImageLogo" runat="server" ImageUrl="..\Images\favicoX.ico" 
                    CssClass="modalPopupImage" />
                <asp:Label ID="modalPopupContent" runat="server"
                    Text="The selected objects may be associated with other objects, usually tickets in the 
                            database. By deleting them, there is a high chance that it will corrupt data in 
                            the database.">
                </asp:Label>
                <br />
                <br />
                <asp:Label ID="AreYouSureLabel" runat="server" Text="Are you sure you want to continue?">
                </asp:Label>
                <br />
                <br />
                <asp:Button ID="OkButton" runat="server" 
                            Text="Ok"
                            Width="100"
                            CssClass="modalPopupHeader"
                            OnClick="btn_DeleteFromAutoGeneratedObjects_Click" />
                <asp:Button ID="CancelButton" runat="server" 
                            Text="Cancel"
                            CssClass="modalPopupHeader"
                            Width="100" />
            </asp:Panel>
        </asp:Panel>
</asp:Panel>
</asp:Content>
